package com.java.star.mall.front.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 订单项参数类
 */
@Data
public class OrderItemParam implements Serializable {

    private static final long serialVersionUID = 1866308528014764575L;

    @ApiModelProperty(value = "商品id")
    @NotNull(message = "商品id不能为空")
    private Integer id;

    @ApiModelProperty(value = "数量")
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量至少需要1件")
    private Integer num;
}
